﻿<form method="get" class="form-horizontal">
	<div class="form-group">
		<label class="col-sm-3 col-sm-offset-1 control-label">搜索内容</label>
		<div class="col-sm-7">
			<div><input type="text" id="search" class="search" name="search" value="" /></div>
		</div>
	</div>
	<div class="form-group">
		<label class="col-sm-3 col-sm-offset-1 control-label">转发数量</label>
		<div class="col-sm-7">
			<div><input type="text" id="zfNum" class="zfNum" name="zfNum" value="" /></div>
		</div>
	</div>
	<div class="form-group">
		<label class="col-sm-3 col-sm-offset-1 control-label">转发话术1</label>
		<div class="col-sm-7">
			<div><input type="text" id="yazfs" class="yazfs" name="yazfs" value="" /></div>
		</div>
	</div>
	<div class="form-group">
		<label class="col-sm-3 col-sm-offset-1 control-label">转发话术2</label>
		<div class="col-sm-7">
			<div><input type="text" id="search01" class="search2" name="search2" value="" /></div>
		</div>
	</div>
	<div class="form-group">
		<label class="col-sm-3 col-sm-offset-1 control-label">转发话术3</label>
		<div class="col-sm-7">
			<div><input type="text" id="search2" class="search2" name="search2" value="" /></div>
		</div>
	</div>
	<div class="form-group">
		<label class="col-sm-3 col-sm-offset-1 control-label">转发话术4</label>
		<div class="col-sm-7">
			<div><input type="text" id="search3" class="search2" name="search2" value="" /></div>
		</div>
	</div>
	<div class="form-group">
		<label class="col-sm-3 col-sm-offset-1 control-label">转发话术5</label>
		<div class="col-sm-7">
			<div><input type="text" id="search4" class="search2" name="search2" value="" /></div>
		</div>
	</div>

</form>



<!-- #################################今日头条(搜索文章评论)################################## -->
<script>


    function btn_select_manage() {
        var search = document.getElementById("search").value;
        var zfNum = document.getElementById("zfNum").value;
        var yazfs = document.getElementById("yazfs").value;
		var search1 = document.getElementById("search01").value;
        var search2 = document.getElementById("search2").value;
        var search3 = document.getElementById("search3").value;
        var search4 = document.getElementById("search4").value;
        var contentArr= [];
        contentArr.push(yazfs,search1,search2,search3,search4);
        console.log(contentArr.length+"contentArr");
        for (var i=0; i<contentArr.length; i++){
            if ( contentArr[i]=="" || contentArr[i]==null || contentArr[i]==undefined){
                contentArr.splice(i,1);
                i = i - 1;
            }
        }
        console.log(contentArr.length+"contentArr");
        console.log(contentArr+"contentArr");

        <!-- var searchResult = search1.split("||"); -->
        if (search== "") {
            toastr.warning("搜索内容不能为空");
        } else if (yazfs == "") {
            toastr.warning("转发话术");
        } else if (zfNum == "") {
            toastr.warning("转发个数不能为空");
        }  else if(!/^[0-9]*$/.test(zfNum)){
            toastr.warning("转发个数只能输入数字!");
            return false;
        }else {
            var json = { "zfNum":zfNum,"search": search,"yazfs": yazfs, "contentArr": contentArr};
            issuedData.setView(JSON.stringify(json));
            $("#select_manage").modal("hide");
            $("#btn_manage").text("抖音(搜索转发视频)");
            $("#btn_manage").show();
            $("#btn_manage").prev().show();
            $("#btn_manage").prev().prev().hide();
            Color.success("state_manage");
        }
    }

</script>